<?php
/**
 * Created by PhpStorm.
 * User: cheng
 * Date: 2017/2/16
 * Time: 14:24
 */
 require_once('./fun_class/vote_class.php');
 //http://ceshi.babypn.com/vote_list.php?action=getVote

 $method = isset($_GET["action"])?$_GET["action"]:null;
 if(empty($method) || is_null($method)){
  die("不能访问");
 }
 $GLOBALS['vote'] = new Vote();
 function getVote(){
  //获取投票页数据
  $GLOBALS['vote']->voteAccessTicket();
 }
 function getPage(){
  //获取投票分页接口
  $GLOBALS['vote']->getListPage();
 }
 function getVoteOpenid(){
  $GLOBALS['vote']->getVoteList();
 }
 function getList(){
  $GLOBALS['vote']->getLists();
 }
 function checkOpenId(){
  $GLOBALS['vote']->checkOpenid();
 }
 function thumbup(){
  $GLOBALS['vote']->thumbUP();
 }
 function clickPic(){
  $GLOBALS['vote']->clickVotePic();
 }
 if($method == "getVote"){
  //获取投票页数据
     getVote();
 }
 if($method == "getLists"){
     getList();
 }
 if($method == "getVoteId"){
  //获取openId
    getVoteOpenid();
 }
 if($method == "getPage"){
   //获取投票分页接口
     getPage();
 }
 if($method == "checkOpen"){
    checkOpenId();
 }
 if($method == "thumbUP"){
    thumbup();
 }
 if($method == "clickpic"){
    //一次性获取数据的接口
    clickPic();
 }
//http://ceshi.babypn.com/vote_list.php?action=thumbUP